cmake_minimum_required(VERSION 3.25)
project(pc_sdk_demo)

set(CMAKE_CXX_STANDARD 14)

set(USE_ARCH_32 0)

if (${USE_ARCH_32} EQUAL 1)
    set(ARCH x86)
else ()
    set(ARCH x64)
endif ()

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install)

include_directories(libs/pc_sdk/include)
include_directories(libs/sdl/include)
include_directories(libs/libyuv/include)

link_directories(libs/pc_sdk/lib/${ARCH})
link_directories(libs/sdl/lib/${ARCH})
link_directories(libs/libyuv/lib/${ARCH})

add_library(cloud_app_sdk SHARED IMPORTED)
set_target_properties(
        cloud_app_sdk
        PROPERTIES IMPORTED_IMPLIB
        ${CMAKE_CURRENT_SOURCE_DIR}/libs/pc_sdk/lib/${ARCH}/cloud_app_sdk.lib)

add_executable(pc_sdk_demo WIN32 main.cpp CPHBuffer.cpp CPHBufferQueue.cpp CPHYuvUtil.cpp)
target_link_libraries(pc_sdk_demo SDL2 SDL2main yuv cloud_app_sdk)
